<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ taglib prefix="c"  uri="http://java.sun.com/jsp/jstl/core"%>    
<%@ page import="dao.*"  %>
<%@ page import="entity.*"  %>
<%@ taglib uri="TagGroup" prefix="mytag"%>
<!doctype html>
<html lang="zh-CN">
<style>
.excerptqzk{clear:both;border:1px solid #EAEAEA;padding:10px 10px 10px 10px;overflow:hidden;background-color:#fff;margin-bottom:-1px;}
div.yijian {
	position: relative;
	top: 10px;
	left: 0px;
}
</style>
<head >
<meta charset="utf-8">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Home</title>
<meta name="keywords" content="">
<meta name="description" content="">
<link rel="stylesheet" type="text/css" h ref="css/bootstrap.min.css">
	<link href="css/bootstrap.min.css" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/nprogress.css">
<link rel="stylesheet" type="text/css" href="css/style.css">
<link rel="stylesheet" type="text/css" href="css/font-awesome.min.css">
<link rel="apple-touch-icon-precomposed" href="images/icon.png">
<link rel="shortcut icon" href="images/favicon.ico">
<link href="https://code.jquery.com/ui/1.10.3/themes/redmond/jquery-ui.css" rel="stylesheet" media="screen">
<script src="js/jquery-2.1.4.min.js"></script>
<script src="js/nprogress.js"></script>
<script src="js/jquery.lazyload.min.js"></script>
<!--[if gte IE 9]>
  <script src="js/jquery-1.11.1.min.js" type="text/javascript"></script>
  <script src="js/html5shiv.min.js" type="text/javascript"></script>
  <script src="js/respond.min.js" type="text/javascript"></script>
  <script src="js/selectivizr-min.js" type="text/javascript"></script>
<![endif]-->
<!--[if lt IE 9]>
  <script>window.location.href='upgrade-browser.html';</script>
<![endif]-->
<script>
function myFunction(){
    alert('提交成功!')
    }

</script>
</head>
<body class="user-select">
 <mytag:userPageHeaderTag/>  
  <!-- <header class="header">
<nav class="navbar navbar-default" id="navbar">

<div class="container">
  <div class="header-topbar hidden-xs link-border">
	<ul class="site-nav topmenu">
	
	  <li><a href="#" style="color:red">你好，请登录！</a></li>
	</ul>
			 勤记录 懂分享</div>
			 
  <div class="navbar-header">
	<button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#header-navbar" aria-expanded="false"> <span class="sr-only"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span> </button>   
	<h1 class="logo hvr-bounce-in"><a href="#" title="木庄网络博客"><img src="images/201610171329086541.png" alt="木庄网络博客"></a></h1>
  </div>
  
  <div class="collapse navbar-collapse" id="header-navbar">
	<ul class="nav navbar-nav navbar-right">
	  <li><a data-cont="企业论坛主页" title="论坛主页" href="index.html">首页</a></li>
	  <li><a data-cont="个人主页"title="个人主页" href="#">个人主页</a></li>
	  <li><a class="glyphicon glyphicon-plus-sign" data-cont="发帖" title="发帖" href="#">发帖</a></li>
	  <li><a data-cont="404"  >#####0</a></li>
	  <li><a data-cont="MZ-NetBolg主题" title="MZ-NetBolg主题" href="#" >#####1</a></li>
	  <li><a data-cont="IT技术笔记" title="IT技术笔记" href="#" >#####2</a></li>
	  <li><a data-cont="源码分享" title="源码分享" href="#" >#####3</a></li>
	  <li><a data-cont="靠谱网赚" title="靠谱网赚" href="#" >#####4</a></li>
	  <li><a data-cont="资讯分享" title="资讯分享" href="#" >#####5</a></li>
	</ul>
  </div>
</div>
</nav>
</header>   -->
<section class="container">
<div class="content-wrap">
<div class="content">
  <div id="focusslide" class="carousel slide" data-ride="carousel">
	<ol class="carousel-indicators">
	  <li data-target="#focusslide" data-slide-to="0" class="active"></li>
	  <li data-target="#focusslide" data-slide-to="1"></li>
	</ol>
	<div class="carousel-inner" role="listbox">
	  <div class="item active"><!-- 顶部可以切换两张图片的那个 -->
	  <img style="height:200px;width:820px" src="images//bg2.jpg" alt="木庄网络博客源码" class="img-responsive">
	  </div>
	  <div class="item">
	  <a href="DocReturn" target="_blank" title="专业网站建设" >
	  <img style="height:200px;width:820px" src="images//bg1.jpg" alt="专业网站建设" class="img-responsive"></a>
	  </div>
	</div>
	
	<!-- 两张图片切换下面那个推荐那一下栏 --><!--  -->
	<a class="left carousel-control" href="#focusslide" role="button" data-slide="prev" rel="nofollow"> <span class="glyphicon glyphicon-chevron-left" aria-hidden="true"></span>  </a> <a class="right carousel-control" href="#focusslide" role="button" data-slide="next" rel="nofollow"> <span class="glyphicon glyphicon-chevron-right" aria-hidden="true"></span></a> </div>
<!--     <article class="excerpt-minic excerpt-minic-index">
		<form class="navbar-form" action="/Search" method="post">
		  <div class="input-group">
			<input type="text" name="keyword" class="form-control" size="90" placeholder="请输帖子关键字" maxlength="50" autocomplete="off">
			<span class="input-group-btn">
			<button class="btn btn-default btn-search" name="search" type="submit">搜索</button>
			</span> </div>
		</form>
	</article> -->
	
	<marquee class="zhifeiji" scrollamount=3 onmouseover=this.stop()
			onmouseout="this.start()">
		<img src="images/zhifeiji.gif" alt="公告" width="91" height="56" />最新公告:${sessionScope.an}</marquee>
  <div class="title"><!-- 主要列表上面的一些主题分类 -->
	<h3 style="color:grey"><a href="#">热门主题:</a></h3>
		<div class="more" style="float:left">
		<a href="Index_Date">全部</a> 
			<c:forEach var="theme" items="${themes}">
				<a href="Index_Date?type=3&theme_id=${theme.theme_id}" title="${theme.theme_name}">${theme.theme_name}</a> 
			</c:forEach>        
				&nbsp;&nbsp;                    
		</div>
	</div>
	
  <div class="content-box-large">
            <div class="panel-body" style="margin:0 0 0 0">
                <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example">
                    <thead>
                        <tr>
                        	<th>No.</th>
                            <th>帖子列表</th>
                        </tr>
                    </thead>
                    <tbody>
                        <c:forEach var="art" items="${articles}" varStatus="status">
                            <tr>
                            	<td>${status.index+1}</td>
                            	<td>
                                    <article class="excerptqzk" style="position:relative; z-index:66;" ><!-- 一个标签具体的一个列 -->
                                        <a href="ShowTieServlet?article_id=${art.article_id}">
                                            <p style="font-size:20px;margin:0px 0px 6px 0px">
                                                <span style="color:red">${art.article_istop eq 1?"[置顶]":""}
                                                </span>${art.article_title}
                                            </p>
                                        </a>
                                        <a class="comment" href="Ta_Home?id=${art.user_id}" title="作者" target="_blank" style="color:rgb(26, 25, 25)"><i class="glyphicon glyphicon-user"></i>${UserDAO.getInstance().get(art.user_id).user_name}</a>
                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                        <time class="time"><i class="glyphicon glyphicon-time"></i> ${art.article_lastchangetime}</time>
                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;     
                                        <span class="views" title="浏览量"><i class="glyphicon glyphicon-eye-open"></i> ${art.article_click_num}</span> 
                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                        <i class="glyphicon glyphicon-comment"></i> ${art.article_comment_num}
                                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                        <i class="glyphicon glyphicon-tags"></i>&nbsp;&nbsp;类别 : ${ThemeDAO.getInstance().get_theme_name(art.theme_id)}
                                    </article>
                                </td>
                            </tr>
                        </c:forEach>
                    </tbody>
                </table>
            </div>
        </div> 
</div>
</div>
<div class="tlinks">Collect from <a href="http://www.cssmoban.com/" >企业网站模板</a></div>
<aside class="sidebar">
<div class="fixed">
  <div class="widget widget-tabs"><!-- 右上角的“统计信息”和“联系站长” -->
	<ul class="nav nav-tabs" role="tablist">
	  <li role="presentation" class="active"><a href="#notice" aria-controls="notice" role="tab" data-toggle="tab" >统计信息</a></li>
	  <li role="presentation"><a href="#contact" aria-controls="contact" role="tab" data-toggle="tab" >团队信息</a></li>
	</ul>
	<div class="tab-content">
	  <div role="tabpanel" class="tab-pane contact active" id="notice">
		<h2>当前帖子总数:
			  ${ArticleDAO.getInstance().getTotal() } 篇
		  </h2>
		  <h2>当前论坛用户总数:
		  <span id="sitetime"> ${UserDAO.getInstance().getTotal() } 位</span></h2>
	  </div>
		<div role="tabpanel" class="tab-pane contact" id="contact">
		  <h2>团队名称: YNWA
			  <a href="" target="_blank" rel="nofollow" data-toggle="tooltip" data-placement="bottom" title=""  data-original-title="QQ:"></a>
		  </h2>
		  <h2>联系方式: 1512342456@qq.com
		  <a href="#" target="_blank" data-toggle="tooltip" rel="nofollow" data-placement="bottom" title=""  data-original-title="#"></a></h2>
	  </div>
	</div>
  </div>
		  <!-- 右上角的搜索框 -->
		  <!-- <div class="widget widget_search">
			<form class="navbar-form" action="/Search" method="post">
			  <div class="input-group">
				<input type="text" name="keyword" class="form-control" size="35" placeholder="请输入关键字" maxlength="15" autocomplete="off">
				<span class="input-group-btn">
				<button class="btn btn-default btn-search" name="search" type="submit">搜索</button>
				</span> </div>
			</form>
		  </div> -->
</div>
<div class="widget widget_hot">
	  <h3>最新评论文章</h3>
	  <ul>    
	  	 <c:forEach var="comment" items="${comments}">         
			<li><a title="点击进入帖子详情" href="ShowTieServlet?article_id=${comment.article_id}" >
			<span class="thumbnail">
				<img class="thumb" data-original="images/commentP.png" src="images/commentP.png" alt="点击进入帖子详情"  style="display: block;">
			</span>
			<span class="text">对文章<span style="color:#3399CC">
                                                《 ${ArticleDAO.getInstance().get(comment.article_id).article_title } 》</span>的评论</span>
			<span class="muted"><i class="glyphicon glyphicon-user"></i>
				${UserDAO.getInstance().get(comment.user_id).user_name}
			</span><br>
			<span class="muted"><i class="glyphicon glyphicon-time"></i>
				${comment.comment_time }
			</span>
			</a></li>
		</c:forEach> 
	 </ul>
</div>


  <form action="AReplyServlet" method="post">
			<div class="yijian">
				<textarea name="content" ${reply.content} cols="48" rows="4">
您的建议！
</textarea>
<br/>
<div align="center">

				<input type="submit" value="提交" onclick="myFunction()">
				</div>
			</div>
		</form>
</aside>
</section>
<footer class="footer">
<div class="container">
<p>Copyright &copy; 企业论坛  Powered by YNWA team!</p>
</div>
<div id="gotop"><a class="gotop"></a></div>
</footer>
<script src="js/bootstrap.min.js"></script>
<script src="js/jquery.ias.js"></script>
<script src="js/scripts.js"></script>

<script src="https://code.jquery.com/jquery.js"></script>
<!-- jQuery UI -->
<script src="https://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
<!-- Include all compiled plugins (below), or include individual files as needed -->
<script src="bootstrap/js/bootstrap.min.js"></script>

<script src="vendors/datatables/js/jquery.dataTables.min.js"></script>

<script src="vendors/datatables/dataTables.bootstrap.js"></script>

<script src="js/custom.js"></script>
<script src="js/tables.js"></script>

</body>
</html>
